package me.xuym.vim.replacefullwidthcharacter;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by broche on 4/22/16.
 */
public class Main {
    public static final void main(String[] args) {
        boolean isDebug = false;
        try {
            BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in, "utf-8"));
            List<String> contents = new ArrayList<>();

            if (!isDebug) {
                String str;
                try {
                    while ((str = bufferedReader.readLine()) != null) {
                        contents.add(str);
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } else {
                FileInputStream fileInputStream = new FileInputStream("a.txt");
                bufferedReader = new BufferedReader(new InputStreamReader(fileInputStream));
                String str;
                try {
                    while ((str = bufferedReader.readLine()) != null) {
                        contents.add(str);
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            for (String str : contents) {
                String res = replace(str);
                System.out.println(new String(res.getBytes("utf-8")));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private static String replace(String str) {
        String str2 = str.replaceAll("！", "! ");
        str2 = str2.replaceAll("，", ", ");
        str2 = str2.replaceAll("？", "? ");
        str2 = str2.replaceAll("；", "; ");
        str2 = str2.replaceAll("：", ": ");
        str2 = str2.replaceAll("（", "(");
        str2 = str2.replaceAll("）", ")");
        str2 = str2.replaceAll("‘", "'");
        str2 = str2.replaceAll("’", "'");
        str2 = str2.replaceAll("“", "\"");
        str2 = str2.replaceAll("”", "\"");
        return str2;
    }
}
